コピー生成プログラム
10 SET WINDOW 0,300,300,0
20 LET i=0
LET a$=""
LET b$=""
30 CLEAR
SET TEXT FONT "MS 明朝",20
PLOT TEXT ,AT 50,50 : "どの商品を宣伝する?"
PLOT TEXT ,AT 50,100 : "1 ポカリ"
PLOT TEXT ,AT 50,150 : "2 コーラ"
PLOT TEXT ,AT 50,200 : "3 マヨネーズ"
PLOT TEXT ,AT 50,250 : "4 カロリーメイト"
50 CHARACTER INPUT NOWAIT: s$
IF s$ = "1" THEN GOTO 100
IF s$ = "2" THEN GOTO 100
IF s$ = "3" THEN GOTO 100
IF s$ = "4" THEN GOTO 100
GOTO 50
100 CLEAR
RANDOMIZE
LET i=INT(4*RND+1)
IF i=1 THEN GOTO 120
IF i=2 THEN GOTO 130
IF i=3 THEN GOTO 140
IF i=4 THEN GOTO 150
120 LET a$="天国"
LET b$="地獄"
GOTO 200
130 LET a$="左"
LET b$="右"
GOTO 200
140 LET a$="夜"
LET b$="昼"
GOTO 200
150 LET a$="空"
LET b$="海"
GOTO 200
200 SET TEXT FONT "MS 明朝",30
PLOT TEXT ,AT 50,150 : aINSERT:CONTENT:ENDamp;"と"&b$
250 CHARACTER INPUT NOWAIT: s$
PLOT TEXT ,AT 50,250 : "nを押して下さい。"
IF s$ = "n" THEN GOTO 300
GOTO 250
300 GOTO 30
END
線や図形を重ねて描く
5 SET WINDOW 0,300,300,0
20 LET x=0
LET y=0
LET x1=0
LET y1=0
30 FOR i=1 TO 60
40 LET x=INT(300*RND)
LET y=INT(300*RND)
RANDOMIZE
LET x1=INT(150+150*RND)
LET y1=INT(150+150*RND)
RANDOMIZE
LET cl=INT(20*RND)
50 SET LINE COLOR cl
SET LINE WIDTH 5
PLOT LINES :x,y; x1,y1
FOR k=1 TO 800000
NEXT k
NEXT i
END
ワープ
OPTION ANGLE DEGREES
5 SET WINDOW 0,300,300,0
SET POINT STYLE 1
20 LET a=0
LET b=0
LET c=0
LET d=0
30 SET AREA COLOR 1
PLOT AREA:0,0;300,0;300,300;0,300;0,0
40 LET x=INT(10*RND)
LET y=INT(10*RND)
LET z=INT(10*RND)
RANDOMIZE
LET xa=INT(10*RND)
LET ya=INT(10*RND)
LET za=INT(10*RND)
50 FOR i=1 TO 150
70 LET a=150+z*i
LET b=150+i
LET c=150+za*i
LET d=150+i
LET e=150-z*i
LET f=150+i
LET g=150-za*i
LET h=150+i
SET COLOR 0
80 PLOT POINTS:a,b
PLOT POINTS:c,d
PLOT POINTS:e,f
PLOT POINTS:g,h
90 FOR k=1 TO 8000
100 NEXT k
REM 150 IF b>150 THEN GOTO 500
NEXT i
500 GOTO 20
END
ひまわり
OPTION ANGLE DEGREES
10 SET WINDOW 0,300,300,0
20 LET t=1
LET i=0
100 RANDOMIZE
LET i=INT(17*RND+1)
LET t=INT(30*RND+1)
120 FOR m=1 TO t
clear
LET i=i+i
DRAW circle WITH SCALE(60)*SHIFT(150,150)
DRAW circle WITH SCALE(30)*SHIFT(90*COS(20+i)+150,90*SIN(20+i)+150)
DRAW circle WITH SCALE(30)*SHIFT(90*COS(60+i)+150,90*SIN(60+i)+150)
DRAW circle WITH SCALE(30)*SHIFT(90*COS(100+i)+150,90*SIN(100+i)+150)
DRAW circle WITH SCALE(30)*SHIFT(90*COS(140+i)+150,90*SIN(140+i)+150)
DRAW circle WITH SCALE(30)*SHIFT(90*COS(180+i)+150,90*SIN(180+i)+150)
DRAW circle WITH SCALE(30)*SHIFT(90*COS(220+i)+150,90*SIN(220+i)+150)
DRAW circle WITH SCALE(30)*SHIFT(90*COS(260+i)+150,90*SIN(260+i)+150)
DRAW circle WITH SCALE(30)*SHIFT(90*COS(300+i)+150,90*SIN(300+i)+150)
DRAW circle WITH SCALE(30)*SHIFT(90*COS(340+i)+150,90*SIN(340+i)+150)
FOR ti=0 TO 1000000
NEXT ti
NEXT m
200 SET TEXT FONT "MS 明朝",30
PRINT "sキーを押して下さい。"
250 CHARACTER INPUT NOWAIT: s$
IF s$ = "s" THEN GOTO 300
GOTO 250
300 GOTO 100
END
雨がふりしきる
OPTION ANGLE DEGREES
5 SET WINDOW 0,300,300,0
SET POINT STYLE 1
20 LET a=0
LET b=0
30 SET AREA COLOR 1
PLOT AREA:0,0;300,0;300,300;0,300;0,0
40 LET x=INT(300*RND)
LET y=INT(20*RND)
LET z=INT(10*RND)/20
RANDOMIZE
LET xa=INT(300*RND)
LET ya=INT(20*RND)
LET za=INT(10*RND)/20
50 FOR i=1 TO 300
70 LET a=x-z*i
LET b=y+i
LET c=xa-za*i
LET d=ya+i*0.9
SET COLOR 0
80 PLOT POINTS:a,b
PLOT POINTS:c,d
90 FOR k=1 TO 8000
100 NEXT k
150 IF b>250 THEN GOTO 200
NEXT i
200 FOR n=20 TO 160 STEP 20
FOR h=0 TO 360
LET x1=a+SIN(h)*n
LET y1=b+COS(h)/3*n
LET x2=c+SIN(h)*n
LET y2=d+COS(h)/3*n-10
SET LINE COLOR 0
PLOT LINES: x1,y1
PLOT LINES: x2,y2
NEXT h
220 NEXT n
FOR k=1 TO 100000
NEXT k
500 GOTO 20
三次元空間のボール
5 SET WINDOW 0,300,0,300
clear
10 PRINT "input x:0-300"
INPUT x
20 PRINT "input y:0-300"
INPUT y
30 LET o=x-20
LET p=y-20
LET q=x+20
LET r=y+20
40 LET a=30
LET b=30
LET c=30
LET i=1
LET j=1
LET m=1
50 CLEAR
SET COLOR 1
DRAW disk WITH SCALE(3)*SHIFT(x,y)
PLOT LINES: 10,10 ; 290,10
PLOT LINES: 10,290 ; 290,290
PLOT LINES: 10,10 ; 10,290
PLOT LINES: 290,10 ; 290,290
PLOT LINES: 90,80 ; 180,80
PLOT LINES: 90,170 ; 180,170
PLOT LINES: 90,80 ; 90,170
PLOT LINES: 180,80 ; 180,170
PLOT LINES: 10,10 ; 90,80
PLOT LINES: 10,290 ; 90,170
PLOT LINES: 290,290 ; 180,170
PLOT LINES: 290,10 ; 180,80
IF c>30 THEN LET m=-1
IF c<2 THEN LET m=1
70 LET a=a+i
LET b=b+j
LET c=c+m
85 SET AREA COLOR 4
DRAW disk WITH SCALE(c/3)*SHIFT(a,b)
86 FOR k=1 TO 30000
87 NEXT k
95 IF a>o THEN GOTO 100 ELSE GOTO 130
100 IF a<q THEN GOTO 110 ELSE GOTO 130
110 IF b>p THEN GOTO 120 ELSE GOTO 130
120 IF b<r THEN GOTO 200 ELSE GOTO 130
130 IF a<50 THEN GOTO 300
140 IF b<50 THEN GOTO 300
150 IF a>250 THEN GOTO 330
160 IF b>250 THEN GOTO 330
180 GOTO 50
200 RANDOMIZE
LET n=INT(4*RND)
210 IF n=0 THEN 300
220 IF n=1 THEN 310
230 IF n=2 THEN 320
240 IF n=3 THEN 330
300 LET i=INT(4*RND)
RANDOMIZE
LET j=INT(4*RND)
GOTO 50
310 LET i=INT(-4*RND)
RANDOMIZE
LET j=INT(4*RND)
GOTO 50
320 LET i=INT(4*RND)
RANDOMIZE
LET j=INT(-4*RND)
GOTO 50
330 LET i=INT(-4*RND)
RANDOMIZE
LET j=INT(-4*RND)
GOTO 50
500 GOTO 50
END
ボール消しゲーム
5 SET WINDOW 0,300,300,0
50 LET a=30
LET b=0
LET i=5
LET c=130
LET d=0
LET m=4
LET e=230
LET f=0
LET k=7
LET c1=1
LET c2=1
LET c3=1
60 FOR ti=1 TO 10000
NEXT ti
CLEAR
70 LET b=b+i
LET d=d+m
LET f=f+k
80 SET AREA COLOR c1
DRAW disk WITH SCALE(5)*SHIFT(a,b)
SET AREA COLOR c2
DRAW disk WITH SCALE(8)*SHIFT(c,d)
SET AREA COLOR c3
DRAW disk WITH SCALE(10)*SHIFT(e,f)
90 CHARACTER INPUT NOWAIT: a$
IF a$ = "i" THEN LET y = y-2
IF a$ = "j" THEN LET x = x-2
IF a$ = "l" THEN LET x = x+2
IF a$ = "m" THEN LET y = y+2
SET AREA COLOR 4
DRAW disk WITH SCALE(5)*SHIFT(150+x,150+y)
IF 150+x=a THEN GOTO 100
IF 150+x=c THEN GOTO 110
IF 150+x=e THEN GOTO 120
GOTO 160
100 IF 150+y=b THEN GOTO 130
110 IF 150+y=d THEN GOTO 140
120 IF 150+y=f THEN GOTO 150
GOTO 160
130 LET c1=0
GOTO 160
140 LET c2=0
GOTO 160
150 LET c3=0
GOTO 160
160 IF b>300 THEN GOTO 300
IF d>300 THEN GOTO 400
IF f>300 THEN GOTO 500
270 GOTO 60
300 RANDOMIZE
LET i=1+INT(4*RND)
LET b=0
LET a=INT(100*RND)
GOTO 80
400 RANDOMIZE
LET m=1+INT(4*RND)
LET d=0
LET c=INT(200*RND)
GOTO 80
500 RANDOMIZE
LET k=1+INT(4*RND)
LET f=0
LET e=INT(280*RND)
GOTO 80
600 GOTO 60
END
しずくと波紋
OPTION ANGLE DEGREES
5 SET WINDOW 0,300,300,0
20 LET a=0
LET b=0
30 PLOT LINES
40 GET POINT: x, y
50 FOR i=1 TO 300
60 CLEAR
70 LET a=x
LET b=y+i
SET COLOR "blue"
80 DRAW disk WITH SCALE(5)*SHIFT(a,b)
90 FOR k=1 TO 80000
100 NEXT k
150 IF b>250 THEN GOTO 200
NEXT i
200 CLEAR
FOR n=20 TO 160 STEP 20
FOR h=0 TO 360
LET x1=a+SIN(h)*n
LET y1=b+COS(h)/3*n
PLOT LINES: x1,y1
NEXT h
220 NEXT n
FOR k=1 TO 1000000
NEXT k
CLEAR
500 GOTO 30
END
ソーラーシステム
20 LET n=2 ! INPUT n
30 SET WINDOW -1,1,-1,1
40 DRAW axes
50 FOR t=0 TO 2*PI STEP PI/180
60 LET r=0.5
CLEAR
SET COLOR "red"
DRAW disk WITH SCALE(0.05)*SHIFT(0,0)
SET COLOR "black"
SET POINT STYLE 7
70 PLOT POINTS: r*COS(t),r*SIN(t)
PLOT POINTS: r*COS(t)+0.04*COS(t*4) ,r*SIN(t)+0.04*sin(t*4)
FOR v=1 TO 100000
NEXT v
80 NEXT t
90 GOTO 50
190 END
桃が川を流れてくる
OPTION ANGLE DEGREES
5 SET WINDOW 0,300,300,0
20 LET a=0
LET b=0
REM LET i=1
REM LET j=1
50 FOR i=1 TO 300
60 CLEAR
FOR j=1 TO 300
SET POINT COLOR "blue"
LET x=150+(j/2)*SIN(j*5)
LET y=j
PLOT POINTS: x-j/10 , y
PLOT POINTS: x+j/10 , y
NEXT j
70 LET a=150+(i/2)*SIN(i*5)
LET b=i
SET COLOR "red"
80 DRAW disk WITH SCALE(5)*SHIFT(a,b)
90 FOR k=1 TO 200000
100 NEXT k
150 IF b>290 THEN GOTO 50
NEXT i
500 GOTO 50
END
SET WINDOW 0 , 300 , 300 ,0
10 CLEAR
20 FOR y=0 TO 180 STEP 10
CLEAR
30 PLOT AREA : 10, 80+y ; 50, 80+y;50,100+y;10,100+y;10,80+y
40 FOR k=1 TO 1500000
50 NEXT k
60 NEXT y
120 FOR y1=0 TO 160 STEP 10
CLEAR
PLOT AREA : 10, 80+y ; 50, 80+y;50,100+y;10,100+y;10,80+y
130 PLOT AREA : 10, 80+y1 ; 50, 80+y1;50,100+y1;10,100+y1;10,80+y1
140 FOR k=1 TO 1500000
150 NEXT k
160 NEXT y1
220 FOR y2=0 TO 150 STEP 10
CLEAR
PLOT AREA : 10, 80+y ; 50, 80+y;50,100+y;10,100+y;10,80+y
PLOT AREA : 10, 80+y1 ; 50, 80+y1;50,100+y1;10,100+y1;10,80+y1
230 PLOT AREA : 10, 80+y2 ; 50, 80+y2;50,100+y2;10,100+y2;10,80+y2
240 FOR k=1 TO 1500000
250 NEXT k
260 NEXT y2
1000 END
5 SET WINDOW 0,300,0,300
LET a$=""
40 CLEAR
LET n=0
SET AREA COLOR 4
CHARACTER INPUT nowait : a$
IF a$ = "m" THEN LET hole=hole+6
DRAW disk WITH SCALE(5-hole/24)*SHIFT(120+hole/4,30+hole)
DRAW disk WITH SCALE(5-hole/24)*SHIFT(180-hole/4,30+hole)
IF hole =120 THEN LET a$=""
IF hole =120 THEN LET hole =0
LET a=INT(10*RND)
LET b=INT(6*RND)
SET TEXT COLOR 3
PLOT TEXT ,AT 150+a, 260+b: "+"
SET TEXT COLOR 4
pLOT TEXT ,AT 150, 260: "+"
SET LINE COLOR 1
PLOT LINES: 100, 280 ; 200, 280;200,240;100,240;100,280
50 PLOT LINES: 150, 150 ; 300, 220
60 PLOT LINES: 150, 150 ; 300, 80
70 PLOT LINES: 150, 150 ; 0, 220
80 PLOT LINES: 150, 150 ; 0, 80
90 FOR px=150 TO 300 STEP 10
LET px1=px+(2^n)/10
LET n=n+1
LET px2=px1*(7/15)+80
100 PLOT LINES: px1,150;px1,px2
120 PLOT LINES: 300-px1,150;300-px1,px2
140 PLOT LINES: px1,150;px1,300-px2
160 PLOT LINES: 300-px1,150;300-px1,300-px2
FOR t=0 TO 100000
NEXT t
NEXT px
GOTO 40
END
5 SET WINDOW 0,300,0,300
10 FOR e=2 TO 30
LET ex=e
50 LET x1=INT(10*RND)
LET p1=INT((300/ex)*RND)+150
LET q1=INT((300/ex)*RND)+150
SET AREA COLOR x1
DRAW disk WITH SCALE(x1)*SHIFT(p1,q1)
60 LET x2=INT(10*RND)
LET p2=INT((300/ex)*RND)+150
LET q2=INT((300/ex)*RND)+150
SET AREA COLOR x2
DRAW disk WITH SCALE(x2)*SHIFT(p2,q2)
70 LET x3=INT(10*RND)
LET p3=INT((300/ex)*RND)+150
LET q3=INT((300/ex)*RND)+150
SET AREA COLOR x3
DRAW disk WITH SCALE(x3)*SHIFT(p3,q3)
80 LET x4=INT(10*RND)
LET p4=-INT((300/ex)*RND)+150
LET q4=-INT((300/ex)*RND)+150
SET AREA COLOR x4
DRAW disk WITH SCALE(x4)*SHIFT(p4,q4)
90 LET x5=INT(10*RND)
LET p5=-INT((300/ex)*RND)+150
LET q5=-INT((300/ex)*RND)+150
SET AREA COLOR x5
DRAW disk WITH SCALE(x5)*SHIFT(p5,q5)
100 LET x3=INT(10*RND)
LET p6=-INT((300/ex)*RND)+150
LET q6=-INT((300/ex)*RND)+150
SET AREA COLOR x6
DRAW disk WITH SCALE(x6)*SHIFT(p6,q6)
110 FOR k=1 TO 1500000
NEXT k
clear
200 NEXT e
210 GOTO 10
END
スロットマシンを改造したルーレット
OPTION ANGLE DEGREES
5 LET total=100
10 SET WINDOW 0,300,300,0
LET t=0
SET TEXT FONT "MS 明朝",30
PRINT "sキーを押して下さい。"
50 CHARACTER INPUT NOWAIT: s$
IF s$ = "s" THEN GOTO 100
GOTO 50
100 RANDOMIZE
LET om=INT(RND*18)*20
FOR i=0 TO 720+om STEP 20
CLEAR
LET t=i*i/10000
LET a=INT(RND*10)
LET p=a
GOSUB 1000
LET a$=p$
LET b=INT(RND*10)
LET p=b
GOSUB 1000
LET b$=p$
LET c=INT(RND*10)
LET p=c
GOSUB 1000
LET c$=p$
LET d=INT(RND*10)
LET p=d
GOSUB 1000
LET d$=p$
LET e=INT(RND*10)
LET p=e
GOSUB 1000
LET e$=p$
LET f=INT(RND*10)
LET p=f
GOSUB 1000
LET f$=p$
LET g=INT(RND*10)
LET p=g
GOSUB 1000
LET g$=p$
LET h=INT(RND*10)
LET p=h
GOSUB 1000
LET h$=p$
LET j=INT(RND*10)
LET p=j
GOSUB 1000
LET j$=p$
REM PLOT TEXT ,AT 100,110,USING "## ## ##" : a$,b$,c$
REM PLOT TEXT ,AT 100,140,USING "## ## ##" : d$,e$,f$
REM PLOT TEXT ,AT 100,170,USING "## ## ##" : g$,h$,i$
DRAW circle WITH SCALE(100)*SHIFT(150,150)
DRAW circle WITH SCALE(80)*SHIFT(150,150)
DRAW disk WITH SCALE(5)*SHIFT(90*COS(i)+150,90*SIN(i)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(20)+150,90*SIN(20)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(40)+150,90*SIN(40)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(60)+150,90*SIN(60)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(80)+150,90*SIN(80)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(100)+150,90*SIN(100)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(120)+150,90*SIN(120)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(140)+150,90*SIN(140)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(160)+150,90*SIN(160)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(180)+150,90*SIN(180)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(200)+150,90*SIN(200)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(220)+150,90*SIN(220)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(240)+150,90*SIN(240)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(260)+150,90*SIN(260)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(280)+150,90*SIN(280)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(300)+150,90*SIN(300)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(320)+150,90*SIN(320)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(340)+150,90*SIN(340)+150)
DRAW circle WITH SCALE(5)*SHIFT(90*COS(360)+150,90*SIN(360)+150)
WAIT DELAY t/800
NEXT i
IF a$=b$ AND b$=c$ THEN
PLOT TEXT ,AT 70,220 : "JACK POT !!!"
LET gain=10
PLOT TEXT ,AT 70,250,USING "##":gain
GOTO 500
END IF
IF d$=e$ AND e$=f$ THEN
PLOT TEXT ,AT 70,220 : "JACK POT !!!"
LET gain=20
PLOT TEXT ,AT 70,250,USING "##":gain
GOTO 500
END IF
IF g$=h$ AND h$=j$ THEN
PLOT TEXT ,AT 70,220 : "JACK POT !!!"
LET gain=30
PLOT TEXT ,AT 70,250,USING "##":gain
GOTO 500
END IF
IF a$=d$ AND d$=g$ THEN
PLOT TEXT ,AT 70,220 : "JACK POT !!!"
LET gain=40
PLOT TEXT ,AT 70,250,USING "##":gain
GOTO 500
END IF
IF b$=e$ AND e$=h$ THEN
PLOT TEXT ,AT 70,220 : "JACK POT !!!"
LET gain=50
PLOT TEXT ,AT 70,250,USING "##":gain
GOTO 500
END IF
IF c$=f$ AND f$=j$ THEN
PLOT TEXT ,AT 70,220 : "JACK POT !!!"
LET gain=60
PLOT TEXT ,AT 70,250,USING "##":gain
GOTO 500
END IF
IF a$=e$ AND e$=j$ THEN
PLOT TEXT ,AT 70,220 : "JACK POT !!!"
LET gain=70
PLOT TEXT ,AT 70,250,USING "##":gain
GOTO 500
END IF
IF c$=e$ AND e$=g$ THEN
PLOT TEXT ,AT 70,220 : "JACK POT !!!"
LET gain=80
PLOT TEXT ,AT 70,250,USING "##":gain
GOTO 500
END IF
LET gain=-10
500 LET total=total+gain
PLOT TEXT ,AT 70,280,USING "TOTAL=###":total
IF total=0 THEN GOTO 2000
GOTO 10
STOP
1000 IF p=1 THEN LET p$="○"
1010 IF p=2 THEN LET p$="×"
1020 IF p=3 THEN LET p$="△"
1030 IF p=4 THEN LET p$="◎"
1040 IF p=5 THEN LET p$="▽"
1050 IF p=6 THEN LET p$="◇"
1060 IF p=7 THEN LET p$="□"
1070 IF p=8 THEN LET p$="●"
1080 IF p=9 THEN LET p$="■"
1090 RETURN
2000 END
空間の中のボール
5 SET WINDOW 0,300,0,300
clear
10 PRINT "input x:0-300"
INPUT x
20 PRINT "input y:0-300"
INPUT y
30 LET o=x-20
LET p=y-20
LET q=x+20
LET r=y+20
40 LET a=30
LET b=30
LET i=1
LET j=1
50 CLEAR
SET COLOR 1
DRAW disk WITH SCALE(3)*SHIFT(x,y)
PLOT LINES: 10,10 ; 290,10
PLOT LINES: 10,290 ; 290,290
PLOT LINES: 10,10 ; 10,290
PLOT LINES: 290,10 ; 290,290
PLOT LINES: 90,80 ; 180,80
PLOT LINES: 90,170 ; 180,170
PLOT LINES: 90,80 ; 90,170
PLOT LINES: 180,80 ; 180,170
PLOT LINES: 10,10 ; 90,80
PLOT LINES: 10,290 ; 90,170
PLOT LINES: 290,290 ; 180,170
PLOT LINES: 290,10 ; 180,80
70 LET a=a+i
LET b=b+j
85 SET AREA COLOR 4
DRAW disk WITH SCALE(10+i+j)*SHIFT(a,b)
86 FOR k=1 TO 30000
87 NEXT k
95 IF a>o THEN GOTO 100 ELSE GOTO 130
100 IF a<q THEN GOTO 110 ELSE GOTO 130
110 IF b>p THEN GOTO 120 ELSE GOTO 130
120 IF b<r THEN GOTO 200 ELSE GOTO 130
130 IF a<50 THEN GOTO 300
140 IF b<50 THEN GOTO 300
150 IF a>250 THEN GOTO 330
160 IF b>250 THEN GOTO 330
170 GOTO 50
200 RANDOMIZE
LET n=INT(4*RND)
210 IF n=0 THEN 300
220 IF n=1 THEN 310
230 IF n=2 THEN 320
240 IF n=3 THEN 330
300 LET i=INT(4*RND)
RANDOMIZE
LET j=INT(4*RND)
GOTO 50
310 LET i=INT(-4*RND)
RANDOMIZE
LET j=INT(4*RND)
GOTO 50
320 LET i=INT(4*RND)
RANDOMIZE
LET j=INT(-4*RND)
GOTO 50
330 LET i=INT(-4*RND)
RANDOMIZE
LET j=INT(-4*RND)
GOTO 50
500 GOTO 50
END